const path = require('path')

module.exports = {
  mode: 'development',
  entry: './src/index.js',
  output: {
    filename: 'build.js',
    path: path.resolve(__dirname, 'dist')
  },
  resolveLoader: {
    // modules: ['node_modules', path.resolve(__dirname, 'loader', 'loader1.js')],
    alias: {
      loader1: path.resolve(__dirname, 'loader', 'loader1.js'),
      loader2: path.resolve(__dirname, 'loader', 'loader2.js'),
      loader3: path.resolve(__dirname, 'loader', 'loader3.js'),
    }
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        use: [
          { loader: 'loader1' },
          { loader: 'loader2' },
          { loader: 'loader3' }
        ]
      }
    ]
  }
}